package com.leyou.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
//@Component
public class HelloJob2 {

    private int count = 1;

    @Scheduled(cron = "0-10 * * * * ?")
    public void job3() throws InterruptedException {
        log.info("task3   运行了  ==> {}", count);
        if(count == 1){
            Thread.sleep(5000);
        }
        count++;
    }

}
